<html>
<head><meta charset="utf-8"><title>html highlighting symbol information · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/html.20highlighting.20symbol.20information.html">html highlighting symbol information</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="171526802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/html%20highlighting%20symbol%20information/near/171526802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Michael E Craggs <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/html.20highlighting.20symbol.20information.html#171526802">(Jul 23 2019 at 15:02)</a>:</h4>
<p>hi, <br>
when highlighting the analysis as html, would it be possible, or how hard would it be to get the symbol type information embedded in the html tags? <br>
what would be the best starting point for such a feature, or is this something undesired within this project?</p>



<a name="171527189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/html%20highlighting%20symbol%20information/near/171527189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/html.20highlighting.20symbol.20information.html#171527189">(Jul 23 2019 at 15:06)</a>:</h4>
<p><span class="user-mention" data-user-id="230543">@Michael E Craggs</span> would would be the end goal here?</p>



<a name="171527226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/html%20highlighting%20symbol%20information/near/171527226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/html.20highlighting.20symbol.20information.html#171527226">(Jul 23 2019 at 15:06)</a>:</h4>
<p>I think the best way to achieve this is probably to separately compute highligting info and type info, and merge them outside of rust-analyzer</p>



<a name="171527678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/html%20highlighting%20symbol%20information/near/171527678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Michael E Craggs <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/html.20highlighting.20symbol.20information.html#171527678">(Jul 23 2019 at 15:12)</a>:</h4>
<p>the idea would be to have a html based code browser which is able to navigate to all symbols within the manifest. not necessarily within this project, just thought this might be the place to look for some starting points ( by reusing existing code, rather than writing new )</p>



<a name="171528203"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/html%20highlighting%20symbol%20information/near/171528203" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/html.20highlighting.20symbol.20information.html#171528203">(Jul 23 2019 at 15:18)</a>:</h4>
<p>Have you seen <code>https://github.com/rust-dev-tools/cargo-src</code> ?</p>



<a name="171528207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/html%20highlighting%20symbol%20information/near/171528207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/html.20highlighting.20symbol.20information.html#171528207">(Jul 23 2019 at 15:18)</a>:</h4>
<p><a href="https://github.com/rust-dev-tools/cargo-src" target="_blank" title="https://github.com/rust-dev-tools/cargo-src">https://github.com/rust-dev-tools/cargo-src</a></p>



<a name="171531328"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/html%20highlighting%20symbol%20information/near/171531328" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/html.20highlighting.20symbol.20information.html#171531328">(Jul 23 2019 at 15:49)</a>:</h4>
<p>But yeah, it should be possible to build this on top of rust-analyzer, in several different ways:</p>
<ul>
<li>statically precompute all the info about the project. Either render html directly, or produce a JSON and render it to html with some JS</li>
<li>have a client-server setup, where the client basically runs an instance of VS Code's monaco editor and communicates with back end via HTTP</li>
<li>run the whole of rust-analyzer in the browser via WASM</li>
</ul>



<a name="171532535"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/html%20highlighting%20symbol%20information/near/171532535" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Michael E Craggs <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/html.20highlighting.20symbol.20information.html#171532535">(Jul 23 2019 at 16:03)</a>:</h4>
<p>never had a close look at cargo-src, but will do as a starting point ;) <br>
thx</p>



<a name="171553688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/html%20highlighting%20symbol%20information/near/171553688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Michael E Craggs <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/html.20highlighting.20symbol.20information.html#171553688">(Jul 23 2019 at 20:10)</a>:</h4>
<blockquote>
<p>Have you seen <code>https://github.com/rust-dev-tools/cargo-src</code> ?</p>
</blockquote>
<p>on the spot, exactly what i was looking for / planning to do ;) many kudos, much apprechiated, thx ;)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>